/*
 * SimpleStringSecondaryindex.h
 *
 *  Created on: May 11, 2014
 *      Author: carlos
 */

#ifndef SIMPLESTRINGSECONDARYINDEX_H_
#define SIMPLESTRINGSECONDARYINDEX_H_
#include "SimpleSecondaryIndex.h"
class SimpleStringSecondaryindex: public SimpleSecondaryIndex {
public:
	SimpleStringSecondaryindex();
	virtual ~SimpleStringSecondaryindex();

	bool operator==(const SimpleStringSecondaryindex& k) { // sobrecarga operador ==
		return this->idstring == k.idstring;
	}
	bool operator>(const SimpleStringSecondaryindex& k) { // sobrecarga operador >
		return this->idstring > k.idstring;
	}
	bool operator<(const SimpleStringSecondaryindex& k) { // sobrecarga operador <
		return this->idstring < k.idstring;
	}

	virtual string getIdstring() {
		return idstring;
	}

	virtual void setIdstring(string idstring) {
		this->idstring = idstring;

	}

	virtual bool isStringId() {
		return true;
	}

	virtual int getDataSize() {
		return sizeof(DataSize) + this->getId_relacionales().size() * sizeof(ID)+this->idstring.size();
	}
private:
	string idstring;

};

#endif /* SIMPLESTRINGSECONDARYINDEX_H_ */
